# Copyright (c) neuron Inc. 2012-
# All rights reserved.
# Author: Chen Zeshi, Scott  

#
# Project Properties
#
PROJECT (QuinceDoc)
SET (APPLICATION_NAME "Quince Document")
SET (APPLICATION_CODENAME "${PROJECT_NAME}")
SET (APPLICATION_COPYRIGHT_YEARS "2012")
SET (APPLICATION_VERSION_MAJOR 1)
SET (APPLICATION_VERSION_MINOR 0)
SET (APPLICATION_VERSION_PATCH 0)
SET (APPLICATION_VERSION_TYPE SNAPSHOT)
SET (APPLICATION_VERSION_STRING "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}-${APPLICATION_VERSION_TYPE}")
SET (APPLICATION_VENDOR_ID "com.neuron")
SET (APPLICATION_VENDOR_NAME "neuron Inc")
SET (APPLICATION_VENDOR_URL "www.neuron.com")
SET (APPLICATION_ID "${APPLICATION_VENDOR_ID}.${PROJECT_NAME}")

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES("${MAINFOLDER}/src/QuinceCommon/QuinceCore")
#
# Configure Files
#
FILE (GLOB_RECURSE CONFIGINPUTS1 *.in.h.cmake)
FILE (GLOB_RECURSE CONFIGINPUTS2 *.h.in.cmake)

LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS2}")
FOREACH (CONFIGINPUT ${CONFIGINPUTS})
    STRING (REPLACE ".in.h.cmake" ".h" CONFIGOUTPUT1 "${CONFIGINPUT}")
    STRING (REPLACE ".h.in.cmake" ".h" CONFIGOUTPUT2 "${CONFIGOUTPUT1}")
    CONFIGURE_FILE ("${CONFIGINPUT}" "${CONFIGOUTPUT2}")
ENDFOREACH (CONFIGINPUT ${CONFIGINPUTS})

FILE (GLOB_RECURSE project_SRCS *.cpp *.cxx *.cc *.C *.c *.h *.hpp)
SET (Quince_LIBS "QuinceCore")
SET (project_LIBS ${Boost_LIBRARIES} ${Quince_LIBS} )

SET(CMAKE_CXX_FLAGS "-std=c++11")


ADD_PCH_RULE("Stdafx.h" ${project_SRCS})

ADD_LIBRARY(${PROJECT_NAME} SHARED ${project_SRCS})


TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${project_LIBS})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}" OUTPUT_NAME ${PROJECT_NAME} CLEAN_DIRECT_OUTPUT 1)

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
